unit HourglassPawn;

interface

uses Pawn, Graphics, Player;

type
 THourglassPawn = class(TPawnWithImage)
 public
  constructor Create(Dim: integer; Color: TColor; Value: Integer);
  procedure OnMoved(Player: TPlayer); override;
 end;

implementation

constructor THourglassPawn.Create(Dim: integer; Color: TColor; Value: Integer);
begin
 inherited Create(Dim, Color, Value, 'graph\hourglass.bmp');
end;

procedure THourglassPawn.OnMoved(Player: TPlayer);
begin
 if Value > 0 then dec(Value);
end;

end.
